#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <aclconio.h>
#include <define.h>
#include <transact.h>
#include <tran.h>
#include <gds.h>
#include <sizes.h>
#include "ConfProto.h"
#include "tblutil.h"
#include <\SOFTPAY\Ver30\source\include\sizes.h>
#include <\SOFTPAY\Ver30\HostSrc\citisrc\citiids.h>
#include <\SOFTPAY\Ver30\HostSrc\cpacsrc\cpacids.h>
#include <confio.h>

#include <\SOFTPAY\Ver30\source\include\HDT.h>



static void *storeFromStruct;

static int recordNum;
void registerHDT(void *ptr)
{
	 storeFromStruct = ptr;
}

void *dealWithAddressBoundary(void*address);
int	inLoadHDTRecFromStruct (int inRecNumber, void *vdStruct)
{
	int inRet;
	char* tmp = (char*)vdStruct;

	registerHDT(vdStruct);
	vdStruct = dealWithAddressBoundary(vdStruct);
	inRet = inLoadConfRec(HDT_FILENAME, SIZE_HDT_REC, inRecNumber, vdStruct);

	recordNum = inRecNumber;
	return inRet;
}

void vdRestoreHDTRecFromStruct(void *vdStruct)
{
	registerHDT(vdStruct);
	vdStruct = dealWithAddressBoundary(vdStruct);
	memcpy((char *) pvdGetHDTRec(), vdStruct, SIZE_HDT_REC);

}

void vdCopyHDTRecFromStruct(void *vdStruct)
{
	registerHDT(vdStruct);
	vdStruct = dealWithAddressBoundary(vdStruct);
		memcpy(vdStruct, (char *) pvdGetHDTRec(), SIZE_HDT_REC);

}

int	inSaveHDTRecFromStruct (int inRecNumber,  void *vdStruct)
{
	int inRet;

	registerHDT(vdStruct);
	vdStruct = dealWithAddressBoundary(vdStruct);
	inRet = inSaveConfRec(HDT_FILENAME, SIZE_HDT_REC, inRecNumber, (char *) vdStruct);

	return inRet;
}

int	inUpdateHDTRecFromStruct (void *vdStruct)
{
	int inRet;

	registerHDT(vdStruct);
	vdStruct = dealWithAddressBoundary(vdStruct);
	inRet = inSaveConfRec(HDT_FILENAME, SIZE_HDT_REC, recordNum, (char *) vdStruct);

	return inRet;
}

short shGetHostGroupRefFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return shGetHostGroupRef();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->shHostGroupRef;
}

void vdSetHostGroupRefFromStruct(short shHostGroupRef, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetHostGroupRef(shHostGroupRef);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->shHostGroupRef = shHostGroupRef;
}

char* szGetHostNameFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetHostName();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->szHostName;
}

void vdSetHostNameFromStruct(const char* szHostName, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetHostName(szHostName);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((HDT_REC*)vdStruct)->szHostName, szHostName, sizeof(((HDT_REC*)NULL)->szHostName)-1);
}

char* szGetHostFileNameFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetHostFileName();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->szHostFileName;
}

void vdSetHostFileNameFromStruct(const char* szHostFileName, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetHostFileName(szHostFileName);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((HDT_REC*)vdStruct)->szHostFileName, szHostFileName, sizeof(((HDT_REC*)NULL)->szHostFileName)-1);
}

char* szGetTRTFileNameFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetTRTFileName();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->szTRTFileName;
}

void vdSetTRTFileNameFromStruct(const char* szTRTFileName, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetTRTFileName(szTRTFileName);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((HDT_REC*)vdStruct)->szTRTFileName, szTRTFileName, sizeof(((HDT_REC*)NULL)->szTRTFileName)-1);
}

char* szGetPETFileNameFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetPETFileName();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->szPETFileName;
}

void vdSetPETFileNameFromStruct(const char* szPETFileName, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetPETFileName(szPETFileName);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((HDT_REC*)vdStruct)->szPETFileName, szPETFileName, sizeof(((HDT_REC*)NULL)->szPETFileName)-1);
}

char* szGetLGOFileNameFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetLGOFileName();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->szLGOFileName;
}

void vdSetLGOFileNameFromStruct(const char* szLGOFileName, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetLGOFileName(szLGOFileName);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((HDT_REC*)vdStruct)->szLGOFileName, szLGOFileName, sizeof(((HDT_REC*)NULL)->szLGOFileName)-1);
}

char* szGetAmountFormatFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return szGetAmountFormat();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->szAmountFormat;
}

void vdSetAmountFormatFromStruct(const char* szAmountFormat, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetAmountFormat(szAmountFormat);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	strNumCopy(((HDT_REC*)vdStruct)->szAmountFormat, szAmountFormat, sizeof(((HDT_REC*)NULL)->szAmountFormat)-1);
}

short shGetCommLinkTypeFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return shGetCommLinkType();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->shCommLinkType;
}

void vdSetCommLinkTypeFromStruct(short shCommLinkType, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCommLinkType(shCommLinkType);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->shCommLinkType = shCommLinkType;
}

short shGetSettleCommLinkTypeFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return shGetSettleCommLinkType();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->shSettleCommLinkType;
}

void vdSetSettleCommLinkTypeFromStruct(short shSettleCommLinkType, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetSettleCommLinkType(shSettleCommLinkType);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->shSettleCommLinkType = shSettleCommLinkType;
}

short shGetPacketTypeFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return shGetPacketType();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->shPacketType;
}

void vdSetPacketTypeFromStruct(short shPacketType, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetPacketType(shPacketType);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->shPacketType = shPacketType;
}

short shGetTransProtocolFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return shGetTransProtocol();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->shTransProtocol;
}

void vdSetTransProtocolFromStruct(short shTransProtocol, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetTransProtocol(shTransProtocol);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->shTransProtocol = shTransProtocol;
}

short shGetSettleProtocolFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return shGetSettleProtocol();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->shSettleProtocol;
}

void vdSetSettleProtocolFromStruct(short shSettleProtocol, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetSettleProtocol(shSettleProtocol);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->shSettleProtocol = shSettleProtocol;
}

short inGetNumAdvFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetNumAdv();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->inNumAdv;
}

void vdSetNumAdvFromStruct(short inNumAdv, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetNumAdv(inNumAdv);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->inNumAdv = inNumAdv;
}

short inGetCurrencyIdxFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetCurrencyIdx();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->inCurrencyIdx;
}

void vdSetCurrencyIdxFromStruct(short inCurrencyIdx, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCurrencyIdx(inCurrencyIdx);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->inCurrencyIdx = inCurrencyIdx;
}

short inGetBatchIndexFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetBatchIndex();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->inBatchIndex;
}

void vdSetBatchIndexFromStruct(short inBatchIndex, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetBatchIndex(inBatchIndex);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->inBatchIndex = inBatchIndex;
}

short inGetFraudControlFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetFraudControl();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->inFraudControl;
}

void vdSetFraudControlFromStruct(short inFraudControl, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetFraudControl(inFraudControl);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->inFraudControl = inFraudControl;
}

short inGetImprintCardConfirmFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetImprintCardConfirm();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->inImprintCardConfirm;
}

void vdSetImprintCardConfirmFromStruct(short inImprintCardConfirm, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImprintCardConfirm(inImprintCardConfirm);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->inImprintCardConfirm = inImprintCardConfirm;
}

short inGetSettlementTypeFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetSettlementType();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->inSettlementType;
}

void vdSetSettlementTypeFromStruct(short inSettlementType, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetSettlementType(inSettlementType);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->inSettlementType = inSettlementType;
}

char chGetBatchUploadSchemeForVoidFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return chGetBatchUploadSchemeForVoid();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->chBatchUploadSchemeForVoid;
}

void vdSetBatchUploadSchemeForVoidFromStruct(char chBatchUploadSchemeForVoid, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetBatchUploadSchemeForVoid(chBatchUploadSchemeForVoid);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->chBatchUploadSchemeForVoid = chBatchUploadSchemeForVoid;
}

char chGetBatchUploadSchemeForAdjustFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return chGetBatchUploadSchemeForAdjust();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->chBatchUploadSchemeForAdjust;
}

void vdSetBatchUploadSchemeForAdjustFromStruct(char chBatchUploadSchemeForAdjust, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetBatchUploadSchemeForAdjust(chBatchUploadSchemeForAdjust);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->chBatchUploadSchemeForAdjust = chBatchUploadSchemeForAdjust;
}

short inGetHDTCustomIntFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetHDTCustomInt();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->inHDTCustomInt;
}

void vdSetHDTCustomIntFromStruct(short inHDTCustomInt, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetHDTCustomInt(inHDTCustomInt);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->inHDTCustomInt = inHDTCustomInt;
}

short inGetCounterIndexFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetCounterIndex();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->inCounterIndex;
}

void vdSetCounterIndexFromStruct(short inCounterIndex, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCounterIndex(inCounterIndex);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->inCounterIndex = inCounterIndex;
}

short shGetCommunicationIndexFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return shGetCommunicationIndex();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->shCommunicationIndex;
}

void vdSetCommunicationIndexFromStruct(short shCommunicationIndex, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCommunicationIndex(shCommunicationIndex);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->shCommunicationIndex = shCommunicationIndex;
}

short inGetSTANSizeFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetSTANSize();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->inSTANSize;
}

void vdSetSTANSizeFromStruct(short inSTANSize, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetSTANSize(inSTANSize);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->inSTANSize = inSTANSize;
}

short inGetMonthFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetMonth();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->inMonth;
}

void vdSetMonthFromStruct(short inMonth, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetMonth(inMonth);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->inMonth = inMonth;
}

short inGetHostFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return inGetHost();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->inHost;
}

void vdSetHostFromStruct(short inHost, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetHost(inHost);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->inHost = inHost;
}

short shGetHostInvNumSizeFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return shGetHostInvNumSize();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->shHostInvNumSize;
}

void vdSetHostInvNumSizeFromStruct(short shHostInvNumSize, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetHostInvNumSize(shHostInvNumSize);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->shHostInvNumSize = shHostInvNumSize;
}

VS_BOOL fGetHDTCustomBit1FromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetHDTCustomBit1();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fHDTCustomBit1;
}

void vdSetHDTCustomBit1FromStruct(VS_BOOL fHDTCustomBit1, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetHDTCustomBit1(fHDTCustomBit1);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fHDTCustomBit1 = fHDTCustomBit1;
}

VS_BOOL fGetHDTCustomBit2FromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetHDTCustomBit2();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fHDTCustomBit2;
}

void vdSetHDTCustomBit2FromStruct(VS_BOOL fHDTCustomBit2, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetHDTCustomBit2(fHDTCustomBit2);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fHDTCustomBit2 = fHDTCustomBit2;
}

VS_BOOL fGetHDTCustomBit3FromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetHDTCustomBit3();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fHDTCustomBit3;
}

void vdSetHDTCustomBit3FromStruct(VS_BOOL fHDTCustomBit3, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetHDTCustomBit3(fHDTCustomBit3);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fHDTCustomBit3 = fHDTCustomBit3;
}

VS_BOOL fGetHDTCustomBit4FromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetHDTCustomBit4();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fHDTCustomBit4;
}

void vdSetHDTCustomBit4FromStruct(VS_BOOL fHDTCustomBit4, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetHDTCustomBit4(fHDTCustomBit4);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fHDTCustomBit4 = fHDTCustomBit4;
}

VS_BOOL fGetIndependentBatchFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetIndependentBatch();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fIndependentBatch;
}

void vdSetIndependentBatchFromStruct(VS_BOOL fIndependentBatch, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetIndependentBatch(fIndependentBatch);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fIndependentBatch = fIndependentBatch;
}

VS_BOOL fGetBatchUploadVoidAsOrigTxFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetBatchUploadVoidAsOrigTx();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fBatchUploadVoidAsOrigTx;
}

void vdSetBatchUploadVoidAsOrigTxFromStruct(VS_BOOL fBatchUploadVoidAsOrigTx, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetBatchUploadVoidAsOrigTx(fBatchUploadVoidAsOrigTx);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fBatchUploadVoidAsOrigTx = fBatchUploadVoidAsOrigTx;
}

VS_BOOL fGetPrintBatNumFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetPrintBatNum();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fPrintBatNum;
}

void vdSetPrintBatNumFromStruct(VS_BOOL fPrintBatNum, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetPrintBatNum(fPrintBatNum);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fPrintBatNum = fPrintBatNum;
}

VS_BOOL fGetCheckHostFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCheckHost();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fCheckHost;
}

void vdSetCheckHostFromStruct(VS_BOOL fCheckHost, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCheckHost(fCheckHost);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fCheckHost = fCheckHost;
}

VS_BOOL fGetCredDebHostFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCredDebHost();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fCredDebHost;
}

void vdSetCredDebHostFromStruct(VS_BOOL fCredDebHost, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCredDebHost(fCredDebHost);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fCredDebHost = fCredDebHost;
}

VS_BOOL fGetCreditPredialFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetCreditPredial();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fCreditPredial;
}

void vdSetCreditPredialFromStruct(VS_BOOL fCreditPredial, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetCreditPredial(fCreditPredial);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fCreditPredial = fCreditPredial;
}

VS_BOOL fGetAllowMultiCurrencyFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetAllowMultiCurrency();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fAllowMultiCurrency;
}

void vdSetAllowMultiCurrencyFromStruct(VS_BOOL fAllowMultiCurrency, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetAllowMultiCurrency(fAllowMultiCurrency);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fAllowMultiCurrency = fAllowMultiCurrency;
}

VS_BOOL fGetImamRefundApprCodeFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamRefundApprCode();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fImamRefundApprCode;
}

void vdSetImamRefundApprCodeFromStruct(VS_BOOL fImamRefundApprCode, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamRefundApprCode(fImamRefundApprCode);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fImamRefundApprCode = fImamRefundApprCode;
}

VS_BOOL fGetImamMacFieldFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamMacField();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fImamMacField;
}

void vdSetImamMacFieldFromStruct(VS_BOOL fImamMacField, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamMacField(fImamMacField);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fImamMacField = fImamMacField;
}

VS_BOOL fGetImamEchoTestFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamEchoTest();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fImamEchoTest;
}

void vdSetImamEchoTestFromStruct(VS_BOOL fImamEchoTest, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamEchoTest(fImamEchoTest);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fImamEchoTest = fImamEchoTest;
}

VS_BOOL fGetImamNeedLogonFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamNeedLogon();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fImamNeedLogon;
}

void vdSetImamNeedLogonFromStruct(VS_BOOL fImamNeedLogon, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamNeedLogon(fImamNeedLogon);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fImamNeedLogon = fImamNeedLogon;
}

VS_BOOL fGetImamLogonStatusFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamLogonStatus();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fImamLogonStatus;
}

void vdSetImamLogonStatusFromStruct(VS_BOOL fImamLogonStatus, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamLogonStatus(fImamLogonStatus);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fImamLogonStatus = fImamLogonStatus;
}

VS_BOOL fGetImamVoidSwipePinFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamVoidSwipePin();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fImamVoidSwipePin;
}

void vdSetImamVoidSwipePinFromStruct(VS_BOOL fImamVoidSwipePin, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamVoidSwipePin(fImamVoidSwipePin);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fImamVoidSwipePin = fImamVoidSwipePin;
}

VS_BOOL fGetImamEmvHostFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamEmvHost();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fImamEmvHost;
}

void vdSetImamEmvHostFromStruct(VS_BOOL fImamEmvHost, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamEmvHost(fImamEmvHost);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fImamEmvHost = fImamEmvHost;
}

VS_BOOL fGetImamGuestHostFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamGuestHost();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fImamGuestHost;
}

void vdSetImamGuestHostFromStruct(VS_BOOL fImamGuestHost, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamGuestHost(fImamGuestHost);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fImamGuestHost = fImamGuestHost;
}

VS_BOOL fGetImamHostPiggyBackFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamHostPiggyBack();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fImamHostPiggyBack;
}

void vdSetImamHostPiggyBackFromStruct(VS_BOOL fImamHostPiggyBack, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamHostPiggyBack(fImamHostPiggyBack);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fImamHostPiggyBack = fImamHostPiggyBack;
}

VS_BOOL fGetImamHostOffineRefundFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamHostOffineRefund();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fImamHostOffineRefund;
}

void vdSetImamHostOffineRefundFromStruct(VS_BOOL fImamHostOffineRefund, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamHostOffineRefund(fImamHostOffineRefund);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fImamHostOffineRefund = fImamHostOffineRefund;
}

VS_BOOL fGetImamHostOfflineVoidFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamHostOfflineVoid();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fImamHostOfflineVoid;
}

void vdSetImamHostOfflineVoidFromStruct(VS_BOOL fImamHostOfflineVoid, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamHostOfflineVoid(fImamHostOfflineVoid);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fImamHostOfflineVoid = fImamHostOfflineVoid;
}

VS_BOOL fGetImamHostTrack1ReqFromStruct(void*vdStruct)
{
	if(vdStruct != storeFromStruct)
		return fGetImamHostTrack1Req();
	vdStruct = dealWithAddressBoundary(vdStruct);
	return ((HDT_REC*)vdStruct)->fImamHostTrack1Req;
}

void vdSetImamHostTrack1ReqFromStruct(VS_BOOL fImamHostTrack1Req, void*vdStruct)
{
	if(vdStruct != storeFromStruct)
	{
		vdSetImamHostTrack1Req(fImamHostTrack1Req);
		return;
	}
	vdStruct = dealWithAddressBoundary(vdStruct);
	((HDT_REC*)vdStruct)->fImamHostTrack1Req = fImamHostTrack1Req;
}

